//
//  MKAPITestGetJson.m
//  MKAPITests
//
//  Created by 苏尚进 on 2022/9/12.
//  Copyright © 2022 moon. All rights reserved.
//

#import "MKAPITestGetJson.h"

@interface MKAPITestGetJson()
@property(nonatomic,strong) NSDictionary *jsonValue;
@end

@implementation MKAPITestGetJson
- (NSString *)path{
    return @"/json";
}

- (void)doRunTask{
    [super doRunTask];
    MKAPIRequestParamJSON *requestParam = [[MKAPIRequestParamJSON alloc] init];
    [self configCommonRequest:requestParam path:@"/json"];
    requestParam.jsonParam.P(@"filesize", @"small");
    requestParam.httpMethod = MKAPIHttpRequestMethodGET;
    [self sendRequestWithParam:requestParam withCompletion:^(__kindof MKAPIHttpRequestBase * _Nullable requestTask, BOOL success, NSError * _Nullable error) {
        if(!error){
            self.jsonValue = requestTask.responseJson;
        }
        [self completeWithError:error];
    }];
}
@end
